package prueba.constans;

import java.sql.ResultSet;

import org.springframework.jdbc.core.RowMapper;

import prueba.bean.ArticuloDTO;

public class RowMapperConstants {
	
	public static final class AlmacenMapper implements RowMapper{
		public Object mapRow(ResultSet rs,int rowNum){
			ArticuloDTO a = new ArticuloDTO();
			try{
				
				a.setId_articulo(rs.getInt("id_articulo"));
				a.setCod_articulo(rs.getString("cod_articulo"));
				a.setNom_articulo(rs.getString("nom_articulo"));
				a.setCant_articulo(rs.getInt("cant_articulo"));
				//System.out.println("codigo"+a.getCod_articulo()+"\tnombre"+a.getNom_articulo());
			}catch(Exception e){
				e.printStackTrace();
			}
			return a;
		}
	}

}
